import http from '../index'

const api = '/store/goods/menu'

export function get() {
  return http.get(api)
}

export function update(data) {
  return data.id ? http.put(api + '/' + data.id, data) : http.post(api, data)
}

export function del(id) {
  return http.delete(api + '/' + id)
}